package com.dykj.fireFighting.api.base.file.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dykj.fireFighting.api.base.file.entity.DataFiles;
import com.dykj.fireFighting.common.core.api.CommonResult;
import org.springframework.web.multipart.MultipartFile;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.List;

/**
 * 资料库
 *
 * @Author JacksonTu
 * @Date 2021-06-19 09:13:50
 */
public interface DataFilesService extends IService<DataFiles> {

    String uploadFile(MultipartFile file);

    InputStream getFile(String id);


    int updateFile(List<String> list, String reId);

    DataFiles getByMongoId(String mongoId);

    String uploadFile(ByteArrayInputStream ins, int length, String fileName, String contentType);

    /**
     * @param reId
     * @return
     */
    List<DataFiles> queryReId(String reId);

    byte[] getDataByFileId(String fileId) throws Exception;

    List<DataFiles> getDataFilesByIds(List<String> ids);

    /**
     * 上传服务器
     *
     * @param file
     * @return
     */
    String uploadLocal(MultipartFile file,String enterpriseName);
}

